x86/p2m: clear_identity_p2m_entry() must cope with 'relaxed' RDM mode
authorJan Beulich <jbeulich@suse.com>
Thu, 13 Aug 2015 12:44:21 +0000 (14:44 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 13 Aug 2015 12:44:21 +0000 (14:44 +0200)
commitadc5b2e05ec781db974216857f98a1ac1d74111b
tree7c05af142e3a9fcc7d09c4955161c8e75005a725
parent9503ab0e9c6a41a1ee7a70c8ea9313d08ebaa8c5
x86/p2m: clear_identity_p2m_entry() must cope with 'relaxed' RDM mode

Tearing down a 1:1 mapping that was never established isn't really nice
(and in fact hits an ASSERT() in p2m_remove_page()). Convert from a
wrapper macro to a proper function which then can take care of the
situation.

Also take the opportunity to remove the 'page_order' parameter of
clear_identity_p2m_entry(), to make it match set_identity_p2m_entry().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/mm/p2m.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/asm-x86/p2m.h